import requests from './request'
export const login = (data) => requests({
    url: '/login',
    method: 'post',
    data
})

export const register = (data) => requests({
    url: '/reg',
    method: 'post',
    data
})

export const getMsg = (number) => requests({
    url: '/getMsg',
    method: 'get',
    params: {roomNumber: number}
})

export const updateMsg = (groupId, msgData) => requests({
    url: '/updateMsg',
    method: 'post',
    data: {
        roomNumber: groupId,
        msgData
    }
})